// redux-thunk
// import { createStore, applyMiddleware } from 'redux';
// import reducer from './reducer';
// import thunk from 'redux-thunk';

// const store = createStore(reducer, applyMiddleware(thunk));

// export default store;

// redux-saga
import { createStore, applyMiddleware } from 'redux';
import reducer from './reducer';
import createSagaMiddleware from 'redux-saga';
import todoSagas from './sagas';

const sagaMiddleware = createSagaMiddleware();

const store = createStore(reducer, applyMiddleware(sagaMiddleware));

sagaMiddleware.run(todoSagas);

export default store;